/**
 * 高管持股管理初始化
 */
var Djg = {
    id: "DjgTable",	//表格id
    seItem: null,		//选中的条目
    table: null,
    layerIndex: -1
};

/**
 * 初始化表格的列
 */
Djg.initColumn = function () {
    return [
        {field: 'selectItem', radio: true},
            {title: '姓名', field: 'gName', visible: true, align: 'center', valign: 'middle'},
            {title: '代码', field: 'gDm', visible: true, align: 'center', valign: 'middle'},
            {title: '变动日期', field: 'gDate', visible: true, align: 'center', valign: 'middle'},
            {title: '变动股数', field: 'gBdgs', visible: true, align: 'center', valign: 'middle'},
            {title: '成交均价', field: 'gAvgPrice', visible: true, align: 'center', valign: 'middle'},
            {title: '变动后股数', field: 'gBdhgs', visible: true, align: 'center', valign: 'middle'},
            {title: '与董监高关系', field: 'gDjggx', visible: true, align: 'center', valign: 'middle'},
            {title: '变动原因', field: 'gBdtype', visible: true, align: 'center', valign: 'middle'},
            {title: '变动金额', field: 'gBdmoney', visible: true, align: 'center', valign: 'middle'},
            {title: '职位', field: 'gJob', visible: true, align: 'center', valign: 'middle'}
    ];
};

/**
 * 查询高管持股列表
 */
Djg.search = function () {
    var queryData = {};
    Djg.table.refresh({query: queryData});
};

$(function () {
    var defaultColunms = Djg.initColumn();
    var table = new BSTable(Djg.id, "/djg/list_detail/" + $("#gDm").val(), defaultColunms);
    table.setPaginationType("server");
    Djg.table = table.init();
});
